//
//  MAPYHomeNavView.swift
//  Mars Proxy
//
//  Created by PowerfullClean on 2023/10/16.
//

import UIKit

class MAPYHomeNavView: MAPYNavView {

    override func mapy_initViews() {
        addSubview(mapy_bgView)
        super.mapy_initViews()
        addSubview(mapy_titleView)
        mapy_bgView.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
        mapy_titleView.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.size.equalTo(CGSize(width: 134, height: 24))
            make.centerY.equalTo(mapy_leftButton.snp.centerY)
        }
        mapy_leftButton.setImage(UIImage(named: "mapy_nav_HomeLeft"), for: .normal)
    }
    
    override func mapy_buttonClick(sender: UIButton) {
        mapy_viewGetVController?.navigationController?.pushViewController(MAPYSettingViewController(), animated: true)
    }
    
    lazy var mapy_bgView: UIImageView = {
        let mapy_bgView = UIImageView(image: UIImage(named: "mapy_nav_HomeBg"))
        return mapy_bgView
    }()
    lazy var mapy_titleView: UIImageView = {
        let mapy_titleView = UIImageView(image: UIImage(named: "mapy_launch_title"))
        return mapy_titleView
    }()
}
